Skip to content

ci: retry pkg-pr-new publish on transient 5xx#1500

Open
TheodorNEngoy wants to merge 2 commits intomodelcontextprotocol:mainfrom
TheodorNEngoy:codex/pkg-pr-new-retry
Open

ci: retry pkg-pr-new publish on transient 5xx#1500
TheodorNEngoy wants to merge 2 commits intomodelcontextprotocol:mainfrom
TheodorNEngoy:codex/pkg-pr-new-retry

Conversation

@TheodorNEngoy
Copy link
Copy Markdown

The Publish Any Commit workflow uses pkg-pr-new to publish preview packages for each PR.

We’ve seen this step intermittently fail with pkg.pr.new 5xx / Cloudflare worker errors (transient external failures), which blocks otherwise-green PRs.

This change wraps the publish step with a small retry loop:

  • Retries up to 3 times with a short backoff.
  • Only retries when the output looks like a transient pkg.pr.new/Cloudflare 5xx failure.
  • Fails fast on other (likely real) errors.

No behavior changes to the SDK itself.

@TheodorNEngoy TheodorNEngoy requested a review from a team as a code owner February 8, 2026 02:48
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 8, 2026

⚠️ No Changeset found

Latest commit: e4deeea

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Feb 8, 2026

Open in StackBlitz

@modelcontextprotocol/client

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/client@1500

@modelcontextprotocol/server

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/server@1500

@modelcontextprotocol/express

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/express@1500

@modelcontextprotocol/hono

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/hono@1500

@modelcontextprotocol/node

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/node@1500

commit: e4deeea

@TheodorNEngoy
Copy link
Copy Markdown
Author

Context: this was prompted by transient pkg.pr.new 5xx/Cloudflare errors intermittently failing the required "Publish Any Commit" check (e.g. on #1499). With this retry in place, those flakes should stop blocking otherwise-green PRs.

@TheodorNEngoy
Copy link
Copy Markdown
Author

Note: no changeset here since this is CI/workflow-only (no package output changes expected).

@felixweinberger
Copy link
Copy Markdown
Contributor

@claude review

Copy link
Copy Markdown
Contributor

@felixweinberger felixweinberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. The regex is over-escaped: change \\(5[0-9]{2}\\) to \(5[0-9]{2}\) (single backslash). With -E, double backslash matches a literal backslash, so the current pattern looks for Check failed \\(502\\) which pkg-pr-new never outputs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants